import request from "@/utils/request"
export function CreateCouponApi(data) {
  return request({
    url: '/coupon/add',
    method: 'post',
    data
  })
}

export function updateCouponApi(data) {
  return request({
    url: '/coupon',
    method: 'put',
    data
  })
}
export function deleteCouponApi(data) {
  return request({
    url: '/coupon/'+data.id,
    method: 'put',
    data
  })
}
export function getCouponPageApi(query) {
  return request({
    url: '/coupon/page',
    method: 'get',
    params: query
  })
}